def num_char(ch:str, s:str) -> int:
    num = 0
    for i in s:
        if i == ch:
            num += 1
    return num

if __name__ == "__main__":
    result = num_char(input("输入一个字符") ,input("输入一串字符"))
    print(f"该字符在字符串中出现{result}次")
